package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.CollectionAttention;
import com.sc.nft.entity.dto.SecondCollectionConfigDTO;
import org.apache.ibatis.annotations.Param;
import com.sc.nft.entity.CollectionAttention;

import java.util.List;
/**
 * 藏品关注(CollectionAttention)表数据库访问层
 *
 * @author 王伟成
 * @since 2024-03-06 15:38:36
 */
public interface CollectionAttentionMapper extends BaseMapper<CollectionAttention> {

    /**
     * 获取关注藏品数量
     *
     * @param userId
     * @return
     */
    Long attentionListCount(@Param("userId") Long userId);

    /**
     * 获取关注藏品列表
     * @param toMp
     * @param userId
     * @return
     */
    IPage<SecondCollectionConfigDTO> attentionList(Page toMp, @Param("userId") Long userId);
}
